<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <title>首页</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<div  id="content">
            <section class="content-header">
                <h1>
                    <i class="fa  fa-send"></i>
                    <strong>预计订货</strong>
                </h1>
                <ol class="breadcrumb">
                    <li><a href="#"><i class="fa fa-home "></i>Home</a></li>
                    <li>信息管理</li>
                    <li class="active">预计订货</li>
                </ol>
            </section>
            <!-- Main content -->
            <section class="content">
                <div class="row">
                    <div class="col-md-12">
                        <div class="box box-info">
                            <div class="box-header with-border">
                                <i class="fa fa-th-list"></i>
                                <h4 class="box-title">预计订货</h4>
                            </div>
							<div class="box-body">
                                <div class="form-inline">
                        	   <div class="input-group">
								<input type="text" class="form-control" id="keyword"  placeholder="Search..." />
								<span class="input-group-btn">
									<button type="button" id="searchBtn" class="btn btn-info searchBtn">查询</button>
							        <button type="button" id="resetBtn" class="btn btn-info cancelBtn">撤消</button>
								</span>
							</div>
									<button type="button" th:if="${module.canRead==true}" id="orderAnalysisEx" class="btn btn-info pull-right addBtn">导出预计订货分析报表</button>
									<button type="button" th:if="${module.canRead==true}" id="orderEx" class="btn btn-info pull-right addBtn">导出预计订货细目报表</button>
									<button type="button" th:if="${module.canAdd==true}" id="btnReg" class="btn btn-info pull-right addBtn">登记</button>
									<button type="button" th:if="${module.canModify==true}" id="btnEdit" class="btn btn-info pull-right editBtn">编辑</button>
									<button type="button" th:if="${module.canDelete==true}" id="btnDel" class="btn btn-info pull-right deleBtn">删除</button>
							</div>
							</div>
                            <div class="box box-body" style="width:100%;overflow-x:scroll;">
                                <table id="dataTable" class="mytable dataTable table-bordered text-center table-striped table-hover"  width="2500px" cellspacing="0" align="center">
                                    <thead>
                                        <tr>
										   <th width="4%">序号</th>
										   <th width="1%"><input type="checkbox" id="checkAll"/></th>
                							   <th width="5%">数量</th>
                							   <th width="5%">金额(元)</th>
                							   <th width="5%">项目负责人</th>
                							   <th width="4%">预计中标率(%)</th>
                							   <th width="8%">中标率说明</th>
                							   <th width="5%">预计订货时间</th>
                							   <th width="5%">项目名称</th>
                							   <th width="5%">重要程度</th>
                							   <th width="5%">创建人</th>
                							   <th width="6%">创建人片区</th>
               							   <th width="6%">信息提供人片区</th>
               							   <th width="5%">订单单位</th>
               							   <th width="5%">数量</th>
               							   <th width="5%">项目动态</th>
                							   <th width="5%">设备情况</th>
                							   <th width="5%">所属行业</th>
                							   <th width="5%">信息来源</th>
                							   <th width="6%">备注</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                	
               						</tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
            <iframe id="ifram" style="display: none;"></iframe>
            <div class="modal" id="orderModal">
			<div class="modal-dialog" role="dialog" style="width:50%">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
						<h4 class="modal-title"><strong>导出预计订货细目报表</strong></h4>
					</div>
					<div class="modal-body">
					<form id="orderToExForm">
					<table class="table table-bordered">
						<tbody>
							<tr>
								<td>开始时间</td><td><input type="date" id="begin" datatype="*,*1-100,t"/></td><td>结束时间</td><td><input type="date" id="end" datatype="*,*1-100,t"/></td>
							</tr>
							<tr>
								<td colspan="4">
								<button type="button" class="btn btn-default pull-right" data-dismiss="modal">关闭</button>
								<button type="button" id="orderToEx" class="btn btn-info pull-right addBtn">导出</button>
								</td>
							</tr>
						</tbody>
					</table>
					</form>
					</div>
				</div>
			</div>
			</div>
			
			<div class="modal" id="orderAnalysisModal">
			<div class="modal-dialog" role="dialog" style="width:50%">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
						<h4 class="modal-title"><strong>预计订货分析报表</strong></h4>
					</div>
					<div class="modal-body">
					<form id="orderAnalysisToExForm">
					<table class="table table-bordered">
						<tbody>
							<tr>
								<td>时间</td><td><input type="month" id="month" datatype="*,*1-100,t"/></td>
							</tr>
							<tr>
								<td colspan="2">
								<button type="button" class="btn btn-default pull-right" data-dismiss="modal">关闭</button>
								<button type="button" id="orderAnalysisToEx" class="btn btn-info pull-right addBtn">导出</button>
								</td>
							</tr>
						</tbody>
					</table>
					</form>
					</div>
				</div>
			</div>
			</div>
			
			<div class="modal" id="editModal">
			<div class="modal-dialog" role="dialog" style="width:50%">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
						<h4 class="modal-title"><strong>修改详情</strong></h4>
					</div>
					<div class="modal-body">
					<form id="editForm" class="widget-box">
					<input type="hidden" id="chanceId"/>
					<input type="hidden" id="orderId"/>
					<table class="table table-bordered">
						<tr>
							<td class="center">片区</td>
							<td><select class="form-control" type="text" id="orderUnitArea" name="orderUnitArea" style="width: 100%">
									<option></option>
									<option th:each="saleArea:${peosaleAreas}" th:text="${saleArea.superiorArea}"></option>
								</select>
							</td>
							<td class="center">订单单位</td>
							<td>
							<div class="col-md-10 input-group" style="margin-left:8px;">
				              	<input readonly="readonly" class="form-control" type="text" id="orderUnit" name="orderUnit"/>
				              	<span class="input-group-btn">
									<button type="button" id="queryCustomer" class="btn btn-info" title="引入客户"><i class="fa fa-search"></i></button>
								</span>
							</div>
							</td>
						</tr>
						<tr>
							<td class="center">项目名称</td>
							<td><input class="form-control" type="text" id="name" name="name"/></td>
							<td>设备名称</td>
							<td><input class="form-control" type="text" id="deviceState" name="deviceState"/></td>
						</tr>
						<tr>
                   			<td class="center">项目负责人</td>
                   			<td><input class="form-control" type="text" id="chargePerson" name="chargePerson"/></td>
                   			<td class="center">预计中标率(%)</td>
                   			<td><input class="form-control" type="text" id="probability" name="probability" datatype="*,*1-100,t"/></td>
                   		</tr>
						<tr>
                   			<td class="center">数量</td>
                   			<td><input class="form-control" type="text" id="orderAmount" name="orderAmount" datatype="*,*1-100,t"/></td>
                   			<td class="center">金额(元)</td>
                   			<td><input class="form-control" type="text" id="amountMoney" name="amountMoney" datatype="*,*1-100,t"/></td>
                   		</tr>
                    		<tr>
                    			<td class="center">预计订货时间</td>
							<td><input type="date" class="form-control" id="expectedDate" name="expectedDate" datatype="*,*1-100,t"/> </td>
							<td colspan="2"></td>                                			
                        	</tr>
						<tr>
                    			<td class="center">中标率说明</td>
                    			<td colspan="3"><textarea id="explain" name="explain" style="width: 90%;resize: no;" cols="5"></textarea></td>
                			</tr>
                			<tr>
                				<td colspan="4">
                					<button type="button" class="btn btn-default pull-right" data-dismiss="modal">关闭</button>
                					<button type="button" id="btnCSave" class="btn btn-primary pull-right">保存</button>
                				</td>
                			</tr>
                    	</table>
					</form>
					</div>
				</div>
			</div>
			</div>
			<div class="modal" id="queryCustomerModal">
        <div class="modal-dialog" role="dialog" style="width:60%">
            <form id="queryCustomerForm">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title"><strong>客户信息引入</strong></h4>
                    </div>
                    <div class="modal-body">
                        <div class="form-horizontal">
                            <div class="box-body">
                                <div class="form-inline">
                                	<div class="input-group">
										<input type="text" class="form-control" id="keyword1"  placeholder="Search..." />
										<span class="input-group-btn">
											<button type="button" id="searchBtn1" class="btn btn-info searchBtn">查询</button>
                                            <button type="button" id="resetBtn1" class="btn btn-info resetBtn">撤消</button>
										</span>
									</div>
								</div>
                            </div>
                            <div class="box box-body" >
                                <table id="customerTable" class="mytable dataTable table-bordered text-center table-striped table-hover" cellspacing="0" width="100%" align="center">
                                    <thead>
                                        <tr>
                                            <th width="10%">序号</th>
                							<th width="20%">单位名称</th>
                				            <th width="20%">所属片区</th>
                				            <th width="20%">行业</th>
                				            <th width="20%">上级单位</th>
                				            <th width="10%">操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                	
               						</tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                       <button type="button" class="btn btn-info" id="pull-in">引入</button>
                        <button type="button" class="btn btn-default" data-dismiss="modal">返回</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <script th:src="@{/expectedOrder/expectedOrderindex.js}"></script>
    </div>
</body>
</html>